import torch
import torchvision.datasets
from torch import nn
from torch.nn import Linear
from torch.utils.data import DataLoader

dataset = torchvision.datasets.CIFAR10("../../dataSet",
                                       transform=torchvision.transforms.ToTensor(),
                                       train=False,
                                       download=True)
class Ah(nn.Module):

    def __init__(self):
        super().__init__()
        self.linear1 = Linear(196608,10)

    def forward(self,input):
        output = self.linear1(input)
        return output


ah = Ah()
dataLoader = DataLoader(dataset,64,drop_last=True)


for data in dataLoader:
    images , tables = data
    print(images.shape)
    #output = torch.reshape(images,(1,1,1,-1))
    output = torch.flatten(images)
    print(output.shape)
    output = ah(output)
    print(output.shape)